package edu.sctu.zhuyingzhi.month201505.day20150515.interfaceTest;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by user13 on 2015/5/12.
 */
public class TextChild extends AbstractArray implements JudgeAge{
    Students[] Array;
    public TextChild(Students[] Array) {
        super(Array);
        this.Array=Array;
    }

    @Override
    public List<Students> getSystem() {
        List<Students> list = new ArrayList<Students>();
        for(int i = 0;i<10;i++){
            if(Array[i].getNumber()>60)
                list.add(Array[i]);


        }

        return list;
    }


    @Override
    public void judge(int age) {
        List<Students> list = new ArrayList<Students>();
        for(int i = 0;i<10;i++){
            if(Array[i].getNumber()>age){}

            list.add(Array[i]);

        }

        System.out.println("人数"+list.size());

        for(int i= 0;i<list.size();i++)
             System.out.println(list.get(i).getName()+" "+list.get(i).getNumber()+" "+list.get(i).getSex());
    }
}
